/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package vn.ikame.android.plugin;

import android.app.Activity;
import android.content.SharedPreferences;

/**
 * 
 * @author KienVN
 */
public class Store {

	SharedPreferences prefs;
	private SharedPreferences.Editor editor;
	private String userName, mobile;

	public Store(Activity activity) {
		prefs = activity.getPreferences(android.content.Context.MODE_PRIVATE);
		this.editor = prefs.edit();
		LoadData();
	}

	private void LoadData() {
		userName = prefs.getString("userName", "");
		mobile = prefs.getString("mobile", "");
	}


	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
		editor.putString("userName", userName);
		editor.commit();
	}

	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
		editor.putString("mobile", mobile);
		editor.commit();
	}
	
}
